/*----------------------------------------------------------------------------------------
*
*  Copyright 2019, Gao Hai Hui, <fromzeropoint@126.com>.  All rights reserved.
*  https://gitee.com/helloworldghh/xoskit.git
*  Use of this source code is governed by a MIT license
*  that can be found in the License file.
*
----------------------------------------------------------------------------------------*/
#include "../import/head.h"
#include "../data_struct/head.h"
#include "../logger/head.h"
#include "../impl/head.h"
#include "helper_log.h"

namespace xos_log
{

    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    // 

    helper_log::helper_log()
    {
    }

    helper_log::~helper_log()
    {
    }

    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    // 

    int helper_log::proc( log_msg *& pMsg )
    {
        int ret = 0;

        for( logger::ITER i = logger::list()->begin(); ( 0 == ret ) && ( i != logger::list()->end() ); ++i )
        {
            logger * p = *i;
            p->m_pLogger->out_put_log( pMsg );
        }

        xos_stl::release_interface( pMsg );

        return ret;
    }

} // xos_log
